@prefixCls: h3-organization;

.h3-organization__label{
  min-height: 32px;
  // overflow-x: hidden;
  // overflow-y: auto;
  border-radius: 4px;
  position: relative;
  padding: 3px 5px 0 5px;
  line-height: 1.4em;
  

  &.disabled{
    color: rgba(0, 0, 0, 0.25);
    background-color: #f5f5f5;
    border: 1px solid #d9d9d9 !important;
  }

  &.show-select{
    border: 1px solid #d9d9d9;
    
    &:hover{
      border-color: @primary-color;
    }

    &:focus{
      border-color: @primary-color;
      box-shadow: 0 0 0 2px @primary-light-color;
      outline: 0;
    }

  }

  &.has-val{
    padding-bottom: 0px;
  }
  // padding-bottom: 3px;
  .h3-organization-selected {
    position: relative;
    // display: inline-block;
    background:rgba(250,250,250,1);
    border-radius:4px;
    border:1px solid #D9D9D9;
    padding: 0 24px 0 26px;
    margin: 0 8px 3px 0;
    height: 24px;
    max-width: 100%;
    // float: left;
    display: inline-block;

    i,span{
      font-size: 12px;
      color: #BFBFBF;
      transform: translateY(-50%);
      position: absolute;
      top:50%;
      &:first-child{
        left: 8px;
        margin-right: 6px;
      }
      &:last-child{
        width: 10px;
        height: 10px;
        font-size: 10px;
        line-height: 10px;
        margin-left: 8px;
        right: 8px;
        top: 65%;
        cursor: pointer;
        &:before{
          display: inline-block;
          transform: translateY(-2px);
        }
      }
    }
    &-name{
      display: inline-block;
      max-width: 215px;
      .overflow-ellipsis();
      // margin-top: calc((24px - @font-size-12) / 2);
      font-size: @font-size-12;
      line-height: 22px;
    }
  }
  .delete{
    position: absolute;
    // top: 50%;
    top: 1.15em;
    transform: translateY(-50%);
    line-height: 0;
    color: rgba(0, 0, 0, 0.25);
    right: 12px;
    cursor: pointer;
  }

  & > span{
    color: @light-color-4;
    display: inline-block;
    // height: 30px;
    line-height: 24px;
    margin:0 6px;
  }

}
.overflow-y-scroll() {
  overflow-y:scroll;
  overflow-x:hidden;
  &::-webkit-scrollbar{
    width: 5px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(0,0,0,0.45);
  }
  &::-webkit-scrollbar-track {
      border-radius: 10px;
      background: #ffffff;
  }

};
.overflow-ellipsis() {
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
};
.dropdownClassName{
  display: none;
}
.@{prefixCls}{
  &-select{
    margin-right: 4px;
    font-size: 14px;
    color: rgba(0,0,0,0.25);
  }
  &-body{
    display:flex;
    &-left{
      width: 389px;
      height: 390px;
      border-right: 1px solid #E8E8E8;
      .@{prefixCls}-body-search{
        position: relative;
        display: flex;
        padding: 12px 24px;
        align-items: center;
        border-bottom: 1px solid #E8E8E8;
        &_icon{
          color: @light-color-4;
        }
        &_input{
          width: 320px;
          height: 22px;
          border: none;
          padding-left: 8px;
          caret-color: @primary-color;
          // text-align: center;
          &:active,&:focus{
            border: none !important;
            outline-color: #fff;
            box-shadow: none;
          }
          &::-webkit-input-placeholder {
            color: @light-color-4;
          }
        }
        &-result{
          position: absolute;
          top: 100%;
          left: 24px;
          width: 349px;
          height: 392px;
          z-index: 2;
          background: rgba(255,255,255,1);
          box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
          border-radius: 4px;
          .@{prefixCls}-search-title{
            padding: 8px 16px;
            border-bottom: 1px solid #E8E8E8;
            color: rgba(0,0,0,0.65);
            font-size: 12px;
            span:nth-child(2){
              float: right;
            }
          }
          .@{prefixCls}-search-content{
            height: calc(100% - 38px);
            .overflow-y-scroll();
            &-item{
              display: flex;
              align-items: center;
              height: 53px;
              &_checkbox{
                flex: auto;
                width: 48px;
                text-align: center;
              }
              .@{prefixCls}-search-item-info{
                border-bottom: 1px solid #E8E8E8;
                flex-basis: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                padding-right: 16px;
                overflow: hidden;
                &_avatar{
                  width: 24px;
                  height: 24px;
                  display: inline-block;
                  border-radius: 24px;
                  font-size: 12px;
                  background-color: gainsboro;
                  margin-right: 8px;
                  text-align: center;
                  img{
                    width: 100%;
                    height: 100%;
                    border-radius: 100%;
                  }
                }
                &-main{
                  height: 100%;
                  padding: 6px 0;
                  display: flex;
                  flex-direction: column;
                  flex: 1;
                  overflow: hidden;
                  span{
                    height: 24px;
                    .overflow-ellipsis();
                  }
                  span:first-child{
                    color: #000000;
                    line-height: 24px;
                  }
                  span:nth-child(2){
                    font-size: 12px;
                    color: rgba(0,0,0,0.65);
                    line-height: 17px;
                  }
                }
              }
              &:hover{
                background-color: #f8f8f8;
              }

            }
          }
        }
        &-result--nodata{
          height: 83px;
          text-align: center;
          padding: 32px 0;
        }
      }
      .@{prefixCls}-body-org{
        display: flex;
        flex-direction: column;
        padding: 8px 0px 0px 24px;
        height: calc(100% - 50px);
        &-breadcrumb{
          margin-bottom: 8px;
          padding-right: 16px;
          max-height: 70px;
          .overflow-y-scroll();
          .h3-organization-breadcrumb-item{
            cursor: pointer;
            color: @primary-color;
          }
          .h3-organization-breadcrumb-item:last-child{
            cursor: default;
            color: #ccc;
          }
          .ant-breadcrumb-separator {
            margin: 0 8px;
          }
        }
        &-tree{
          flex: 1;
          padding-right:16px;
          .overflow-y-scroll();
          .@{prefixCls}-tree-item{
            margin-top: 8px;
            display: flex;
            justify-content: space-between;
            &_checkbox{
              margin-right: 8px;
              flex: 1;
              .overflow-ellipsis();

              .ant-checkbox+span{
                vertical-align: middle;
                line-height: 1;
                top: -.09em;
                position: relative;
              }

            }
            &_child{
              cursor: pointer;
              color: @primary-color;
              i,span{
                margin-right: 4px;
              }
            }
            &_child--nochildren{
              color: #ccc;
              cursor: not-allowed;
            }
            &_child--selected{
              color:rgba(0,0,0,0.25);
            }
          }
        }
      }
    }
    &-right{
      padding: 16px;
      width: calc(100% - 389px);
      height: 390px;
      .overflow-y-scroll();
      .@{prefixCls}-selected{
        position: relative;
        display: inline-block;
        background:rgba(250,250,250,1);
        border-radius:4px;
        border:1px solid #D9D9D9;
        padding: 0 24px 0 26px;
        margin: 0 8px 8px 0;
        height: 22px;
        max-width: 100%;
        i,span{
          font-size: 12px;
          color: #BFBFBF;
          transform: translateY(-50%);
          position: absolute;
          top:50%;
          &:first-child{
            left: 8px;
            margin-right: 6px;
          }
          &:last-child{
            width: 10px;
            height: 10px;
            font-size: 10px;
            margin-left: 8px;
            right: 8px;
            top: 48%;
            &:before{
              display: inline-block;
              transform: translateY(-2px);
            }
          }
        }
        &-name{
          display: inline-block;
          max-width: 215px;
          .overflow-ellipsis();
        }
      }
    }
  }
  &-footer{
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
  }



}
